package com.robotic.videoAlarm.service.impl;

import java.util.List;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.robotic.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.robotic.videoAlarm.mapper.VideoAlarmRecordMapper;
import com.robotic.videoAlarm.domain.VideoAlarmRecord;
import com.robotic.videoAlarm.service.IVideoAlarmRecordService;

/**
 * 异常行为报警管理Service业务层处理
 *
 * @author ruoyi
 * @date 2025-09-15
 */
@Service
public class VideoAlarmRecordServiceImpl extends ServiceImpl<VideoAlarmRecordMapper, VideoAlarmRecord> implements IVideoAlarmRecordService
{
    @Autowired
    private VideoAlarmRecordMapper videoAlarmRecordMapper;

    /**
     * 查询异常行为报警管理
     *
     * @param id 异常行为报警管理主键
     * @return 异常行为报警管理
     */
    @Override
    public VideoAlarmRecord selectVideoAlarmRecordById(Long id)
    {
        return videoAlarmRecordMapper.selectVideoAlarmRecordById(id);
    }

    /**
     * 查询异常行为报警管理列表
     *
     * @param videoAlarmRecord 异常行为报警管理
     * @return 异常行为报警管理
     */
    @Override
    public List<VideoAlarmRecord> selectVideoAlarmRecordList(VideoAlarmRecord videoAlarmRecord)
    {
        return videoAlarmRecordMapper.selectVideoAlarmRecordList(videoAlarmRecord);
    }

    /**
     * 新增异常行为报警管理
     *
     * @param videoAlarmRecord 异常行为报警管理
     * @return 结果
     */
    @Override
    public int insertVideoAlarmRecord(VideoAlarmRecord videoAlarmRecord)
    {
        videoAlarmRecord.setCreateTime(DateUtils.getNowDate());
        return videoAlarmRecordMapper.insertVideoAlarmRecord(videoAlarmRecord);
    }

    /**
     * 修改异常行为报警管理
     *
     * @param videoAlarmRecord 异常行为报警管理
     * @return 结果
     */
    @Override
    public int updateVideoAlarmRecord(VideoAlarmRecord videoAlarmRecord)
    {
        videoAlarmRecord.setUpdateTime(DateUtils.getNowDate());
        return videoAlarmRecordMapper.updateVideoAlarmRecord(videoAlarmRecord);
    }

    /**
     * 批量删除异常行为报警管理
     *
     * @param ids 需要删除的异常行为报警管理主键
     * @return 结果
     */
    @Override
    public int deleteVideoAlarmRecordByIds(Long[] ids)
    {
        return videoAlarmRecordMapper.deleteVideoAlarmRecordByIds(ids);
    }

    /**
     * 删除异常行为报警管理信息
     *
     * @param id 异常行为报警管理主键
     * @return 结果
     */
    @Override
    public int deleteVideoAlarmRecordById(Long id)
    {
        return videoAlarmRecordMapper.deleteVideoAlarmRecordById(id);
    }
}
